"""
======================
Author: 柠檬班-小简
Time: 2022/10/21 21:04
Project: day4_framwork_V1
Company: 湖南零檬信息技术有限公司
======================
"""
import json

# # 没有涉及到json与字典不一样的地方: true,false, null
# ss = '{"principal":"student","credentials":"123456a","imageCode":"lemon"}'
#
# print(json.loads(ss))
# print(eval(ss))

# # 有涉及到json与字典不一样的地方: true,false, null
# ss = '{"principal":true,"credentials":null,"imageCode":"lemon"}'
# print(json.loads(ss))  # 处理json风格.
# print(eval(ss))  # 只能python语法风格.

# 字符串涉及表达式
ss = '{"principal":float(100+22.2),"credentials":100>200,"imageCode":"lemon"}'
# print(json.loads(ss))
print(eval(ss))  # 只能python语法风格.